package Ar;

import java.util.Scanner;

/**
 * @Author MDD
 * @Description
 * @Version
 * @Date
 **/
public class No_1 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        double[] price = new double[5];

        double sum = 0;
        System.out.println("请输入本月消费记录");
        for (int i = 0; i < price.length; i++) {
            System.out.print("请输入第"+(i+1)+"笔购物金额：");
            price[i] = sc.nextDouble();
            sum += price[i];
        }
        System.out.println("序号\t\t\t\t金额（元）");
        for (int i = 0; i < price.length ; i++) {
            System.out.println((i+1)+"\t\t\t\t"+price[i]);
        }
        System.out.println("总金额\t\t\t\t"+sum);
    }
}
